import config from '../../config/index'
export default {
  namespaced: true,
  state: {
    clickTaskKey: '',
    isEdit: false,
    isEngineEdit: false,
    pageNum: 1,
    pageSize: 10,
    pageOptionsList: [10, 20, 30, 40, 50],
  },
  mutations: {
    updateClickTaskKey(state, payload) {
      state.clickTaskKey = payload;
    },
    updateIsEdit(state, payload) {
      state.isEdit = payload;
    },
    updateIsEngineEdit(state, payload) {
      state.isEngineEdit = payload;
    }
  },
  actions: {
    updateClickTaskKey({commit}, clickTaskKey) {
      localStorage.setItem('clickKey', clickTaskKey);
      commit('updateClickTaskKey', clickTaskKey);
    },
    updateIsEdit({commit}, isEdit) {
      commit('updateIsEdit', isEdit);
    },
    updateIsEngineEdit({commit}, isEngineEdit) {
      commit('updateIsEngineEdit', isEngineEdit);
    }
  },
  getters: {}
}
